package com.ciwong.epaper.modules.epaper.adapter;

import android.view.View;
import android.widget.TextView;

import com.ciwong.epaper.R;
import com.ciwong.epaper.modules.epaper.bean.SearchBookKeyNameBean;
import com.ciwong.epaper.modules.me.adapter.BaseCommonAdapter;
import com.ciwong.epaper.modules.me.bean.DubHotWord;

import java.util.List;

/**
 * @description: 配音搜索列表关键词适配器
 * @author: wyk
 * @time: 2022/1/18 10:25
 */
public class DubReCommendAdapter extends BaseCommonAdapter {

    public DubReCommendAdapter(List<DubHotWord> dataList) {
        super(dataList);
    }

    @Override
    public int getItemResId(int position) {
        return R.layout.item_hot_word;
    }

    @Override
    public Object createViewHolder(View convertView, int position) {
        DubReCommendAdapter.ViewHolder viewHolder = new DubReCommendAdapter.ViewHolder();
        viewHolder.tv_hot_word = (TextView) convertView.findViewById(R.id.tv_hot_word);

        return viewHolder;
    }

    @Override
    public void showData(Object bean, Object holder, int position) {
        DubReCommendAdapter.ViewHolder viewHolder = (DubReCommendAdapter.ViewHolder) holder;
        DubHotWord hot_word = (DubHotWord) bean;
        viewHolder.tv_hot_word.setText(hot_word.getName());
    }
    private class ViewHolder{
        public TextView tv_hot_word;
    }
}
